<template>
    <div>
        <van-nav-bar
        title="周边订单"
        left-arrow
        @click-left="onClickLeft"
        />
        <Zhoubuy
            v-for="merch in merchs"
                :key="merch.id"
                v-bind="merch"
        ></Zhoubuy>
    </div>
</template>

<script>
import axios from 'axios'
import Zhoubuy from "@/components/Zhoubuy.vue"
    export default {
        components:{
            Zhoubuy,
        },
        data(){
            return{
                merchs: [],
            }
        },
        created(){
            axios.get("http://localhost:8087/buyMerch/list").then((res)=>{
                this.merchs = res.data.data;
                console.log(this.merchs);
            })
        },
        setup() {
            const onClickLeft = () => history.back();
                return {
                    onClickLeft,
            };
        },
    };

</script>

<style lang="scss" scoped>

</style>